/*----------------------------------------------------------------------
  - File name      : key.h
  - Author         : Liu Chao
  - Update date    : 2020-07-14                   
  -	Copyright      : Gevico Electronic studio   
  - Module comments: 
-----------------------------------------------------------------------*/
#ifndef __KEY_H_
#define __KEY_H_
/*-----------------------------------------------------------------------
|                               INCLUDES                                |
-----------------------------------------------------------------------*/
#include "main.h"
/*-----------------------------------------------------------------------
|                                 DATA                                  |
-----------------------------------------------------------------------*/

#define   KEY_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOA_CLK_ENABLE()

#define   KEY_GPIO_PORT    GPIOA
#define   KEY_UP_PIN       GPIO_PIN_8
#define   KEY_DOWN_PIN     GPIO_PIN_9

/*--------------------------------------------------------
| @Description: OV7725 refresh camera data function      |
--------------------------------------------------------*/

typedef enum 
{
  KEY_STATE_SING = 0,
  KEY_STATE_MANY = !KEY_STATE_SING
} KEY_STATE;


/*-----------------------------------------------------------------------
|                             API FUNCTION                              |
-----------------------------------------------------------------------*/

void Key_GPIO_Init(void);
uint16_t Key_Scan_One(GPIO_TypeDef  *GPIOx,KEY_STATE Mode);

#endif
/*-----------------------------------------------------------------------
|          END OF FLIE        (C) COPYRIGHT Gevico Electronics          | 
-----------------------------------------------------------------------*/
